{template 'admin','header'}
<script language="javascript">
function change_plug(myobj)
{
	r_request('{$self_dir}/plugins.php?action=getfuncs&plug='+myobj.value);
}
</script>
<form action="{$self_dir}/plugins.php?action=add" method="post" onsubmit="return r_submit(this);">
<table cellspacing="1" cellpadding="0" class="table_form">
    <caption>添加钩子关联</caption>
<tbody>
    <tr>
        <td class="align_r" width="30%"><strong>站点</strong></td><td>
        <select name="siteid" id="siteid">
                  <option value="">所有站点</option>
                  {loop $site_list $key=>$value}
                    <option value="{$key}">{$value}</option>
                  {/loop}
                </select>
        </td>
    </tr>
    <tr>
        <td class="align_r" width="30%"><strong>插件</strong></td><td>
        <select name="plug" id="plug" onchange="change_plug(this)">
                  <option value="">请选择</option>
                  {loop $plug_list $key=>$value}
                    <option value="{$value[0]}">{$value[2]}</option>
                  {/loop}
                </select>
        </td>
    </tr>
    <tr>
        <td class="align_r" width="30%"><strong>方法</strong></td>
        <td>
        	<select name="func" id="func">
        	<option>请选择</option>
        	</select>
        </td>
    </tr>
    <tr>
        <td class="align_r" width="30%"><strong>钩子</strong></td><td>
        <select name="hook" id="hook">
                  {loop $hook_list $key=>$value}
                    <option value="{$key}">{$key}</option>
                  {/loop}
                </select>
                <input type="hidden" name="forward" value="{$forward}">
        </td>
    </tr>
    <tr>
        <td></td><td><input type="submit" value="添加"/>&nbsp;&nbsp;&nbsp;<input type="button" value="返回" onclick="self.location='{urldecode($forward)}'" /></td>
    </tr>
</tbody>
</table>
</form>
{template 'admin','footer'}